import request from '@/router/axios';

const baseUrl = '/zuul/materialManage/file/filecommon';
import commonUtil from '@/utils/common.js';
import qs from 'qs';

export function getBusiId() {
	return request({
		method: 'post',
		url: '/zuul/materialManage/dPcsPartnerThreadMsg/getBusinessId'
	});
}
export function uploadFile(data) {
	return request({
		method: 'post',
		url: baseUrl + '/uploadFile',
		data: data
	});
}

export function getFileList(data) {
	return request({
		method: 'post',
		url: baseUrl + '/getFileList',
		data: data
	});
}

export function downloadFile(fileId) {
	return request({
		method: 'get',
		url: baseUrl + '/downloadFile?fileId='+fileId
	});
}


export function downloadFilePost(data) {
	return request({
		method: 'post',
		data: data,
		url:  '/zuul/businessManage/ftp/download'
	});
}

export function deleteFile(data) {
	return request({
		method: 'post',
		data: data,
		url: '/zuul/materialManage/file/filecommon/deleteFile'
	});
}
export function uploadFiles(data) {
	return request({
		url: '/zuul/materialManage/file/filecommon/uploadFile',
		method: 'POST',
		data
	});
}

export function deleteFileById(id) {
	return request({
		method: 'post',
		params: {
			fileId: id
		},
		url: '/zuul/materialManage/file/filecommon/deleteFile'
	});
}

